﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<List<DAL.Facility>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <h2>List</h2>
    <%using (Html.BeginForm()){ %>

        <div id="divFacilitiesList">
            <fieldset>
            
            <table width="auto" style="vertical-align:top; border-spacing:1px;">
                <thead style="font-size:1.1em; font-weight:bold; background-color:#3A4F63; color:white;">
                    <tr style="vertical-align:top;">
                        <td style="width:120px">
                            Name
                        </td>
                        <td style="width:auto">
                            Description
                        </td>
                        <td style="width:100px">
                            Maintenance
                        </td>
                        <td style="width:80px">
                            Edit
                        </td>
                        <td style="width:80px;">
                            Delete
                        </td>
                    </tr>
                </thead>
                <tbody style="border-style:solid; border-width:1px; border-color:Black;">
            <% foreach (var m in ViewData.Model)
               { %>
                <tr style="vertical-align:top;">
                <td>
                <%= m.Name %>
                </td>
                <td>
                <%= m.Description %>
                </td>
                <td>
                <%: Html.CheckBox("chkMaintenance", m.IsUnderMaintenance, new { @disabled="disabled"})%>
                </td>
                <td>
                <%= Html.ActionLink("Edit", "Edit", new { id = m.Id })%></td><td>
                <%= Html.ActionLink("Delete", "Delete", new { id = m.Id })%>     </td>  
                </tr>                
            <% } %>
            </tbody>
            </table>     
            </fieldset>
        </div>

    <%} %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
